TimeoutException: fix defaults to avoid notices with PHP 8.1#50
Conversation
clue
left a comment
There was a problem hiding this comment.
@Thomas-Gelf Thanks for looking into this, your changes make a lot of sense to me! I've filed #49 a few days ago which adds documentation for the existing APIs and also stumbled upon this.
As a first step, I think adding the documentation for the existing API via #49 makes sense. Accordingly, the message can be given as a null value to the constructor (not suggesting it's a good idea, merely inspecting the existing API). As such, I think we should probably apply your changes to address the default type, but also type cast internally in case a null value is given explicitly.
What do you think about this?
0fa200e to
d4a0b8c
Compare
clue
left a comment
There was a problem hiding this comment.
@Thomas-Gelf Awesome, thank you for the update, changes LGTM! ![]()
Keep it up 👍
When being strict about deprecations, once reaching a
timeout(), your code will fail on PHP 8.1. That's what this pull request attempts to fix.Hint: created two distinct commits, the first one allows to trigger the error. You can have a look at a failing test run here.